package com.jie.study

import android.os.Bundle
import androidx.appcompat.widget.Toolbar
import com.jie.commonlib.base.BaseActivity
import com.jie.study.databinding.ActivityNotFoundBinding

/**
 * ARouter未找到路径时显示的默认页面
 */
class NotFoundActivity: BaseActivity() {

    private val mViewBinding by lazy {
        ActivityNotFoundBinding.inflate(layoutInflater)
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(mViewBinding.root)
        initToolbar()
        initView()
    }

    private fun initToolbar() {
        val toolbar = findViewById<Toolbar>(R.id.toolbar)
        toolbar.setTitle(R.string.app_name)
        setSupportActionBar(toolbar)
        supportActionBar?.setDisplayHomeAsUpEnabled(true)
    }

    private fun initView() {
        mViewBinding.emptyView.showOrHidden(true, R.string.not_found_page)
    }

}